#pragma once
#include "Cpunt2D.h"
#include "CSegment2D.h"

class CRectangle2D
{
public:

	CRectangle2D(void);
	CRectangle2D(Cpunt2D p1, Cpunt2D p3);
	CRectangle2D(CSegment2D s1, CSegment2D s2);
	CRectangle2D(const CSegment2D &s5);
	CRectangle2D(const CRectangle2D &rec);
	~CRectangle2D(void);
	Cpunt2D getP1()const;
	Cpunt2D getP2()const;
	Cpunt2D getP3()const;
	Cpunt2D getP4()const;
	CSegment2D getS1()const;
	CSegment2D getS2()const;
	CSegment2D getS3()const;
	CSegment2D getS4()const;
	CSegment2D getS5()const;
	void setP1(const Cpunt2D p1);
	void setP3(const Cpunt2D p3);
	void setS5(const CSegment2D s5);
	int getArea()const;
	int getPerim()const;
	CRectangle2D operator=(const CRectangle2D &r);
	
private:

	Cpunt2D m_p1;
	Cpunt2D m_p3;

};
